package com.cwh.taskcenter.reward.strategy;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author cwh
 */
@Component
@RequiredArgsConstructor
public class RewardStrategyFactory {
    private final Map<String, RewardStrategy> strategyMap;

    /**
     * 获取奖励策略
     * @param rewardType 奖励类型
     * @return 奖励策略
     */
    public RewardStrategy getStrategy(String rewardType) {
        return strategyMap.get(rewardType);
    }
}
